package me.zxk.qwert_poetry.dao;

import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

public interface CollectionPoemRepository extends JpaRepository<CollectionPoem, CompositeKey4CollectionPoem> {
    List<CollectionPoem> findAllByPoemId(Integer poemId);
    List<CollectionPoem> findAllByCollectionId(Integer collectionId);
    CollectionPoem findByPoemIdAndCollectionId(Integer poemId, Integer collectionId);
    void deleteByPoemIdAndCollectionId(Integer poemId, Integer collectionId);
}
